package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"task/taskapi/internal/config"
	"task/tasrpc/tasrpcclient"
)

type ServiceContext struct {
	Config  config.Config
	TaskRpc tasrpcclient.Tasrpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config:  c,
		TaskRpc: tasrpcclient.NewTasrpc(zrpc.MustNewClient(c.TaskRpc)),
	}
}
